<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 *
 * @ID ajax_action.php
 * 住哪酒店分销联盟（ajax调用）
 * @date 2013-1-24
 * @author zhaojianjun zjj008@gmail.com
 * @copyright zhuna Inc , all rights reserved
 *
 */

class Ajax_action extends CI_Controller 
{
    
    function __construct()
    {
        parent::__construct();
    }
    
	public function ajax_set_time()
	{
		$tm1 = $_GET['tm1'];
		$tm2 = $_GET['tm2'];
		
		$cookieInfo = array(
				'tm1' => $tm1,
				'tm2' => $tm2,
		);
		
		//设置cookie
		$cookieStr = '';
		foreach ($cookieInfo as $key=>$val) {
			$cookieStr .=  $key.','.$val.'|';
		}
		$cookieStr = rtrim($cookieStr,'|');
		$searchCookie = array(
				'name'   => 'search',
				'value'  => $cookieStr,
				'expire' => '3600',
		);
		$this->input->set_cookie($searchCookie);
	}
}